import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('user', () => {
    const nickname = ref('')
    const avator = ref('')
    const password = ref('')
    const username = ref('')
    function setUser(data: any) {
        nickname.value = data.nickname
        avator.value = data.avator
        password.value = data.password
        username.value = data.username
    }

    return { nickname, avator, password, username, setUser }
})
